/**
 * 2015-2016 龙果学院 (www.roncoo.com)
 */
package com.roncoo.education.controller;

import java.util.Date;
import java.util.HashMap;

import com.roncoo.education.service.RedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.roncoo.education.bean.User;

/**
 * spring-boot-demo-2-1
 * 
 * @author wujing
 */
@RestController
@RequestMapping(value = "/index")
public class IndexController {

	@Autowired
	private RedisService redisService;

	@RequestMapping
	public String index() {
		int count = Integer.parseInt(String.valueOf(redisService.get("count")==null?"0":String.valueOf(redisService.get("count"))));
		redisService.set("count",count+1);
		return "hello world:count="+count;
	}



}
